<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

/**
 * @abstract 支付订单接口
 * @author zxj
 */
class Pay_order extends CI_Controller
{
    function __construct()
    {
        parent::__construct();
    }

    function get_pay_order()
    {
        $payData = gp();
        log_output($payData);
        //$this->common_model->insert('');



        log_output($payData);
    }


    function get_order_price()
    {
        header('Content-Type: application/json; charset=utf-8');
        //推送数据
        $url = "http://tomrepair.es/~tomrepair/api/getPaymentInfo";
        $data_to_post = array();
        $data_to_post['user'] = 'api@tomrepair.es';
        $data_to_post['token'] = '78de933bd0fbacf02ef2de1116e3338f1c627b07';
        $data_to_post['orderID'] = '56FAE8338A670';
        $data_to_post = json_encode($data_to_post);
        $headers = array();
        $headers[] = 'Authorization: DMCOHh3Y6Zf562MaDU3YzMyRjp3RFP9987trzdLZRZzcjFt';
        $headers[] = 'Content-Type: application/json; charset=utf-8';

        $curl = curl_init();
        curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_POST, 1);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($curl, CURLOPT_POSTFIELDS, $data_to_post);
        $result = curl_exec($curl);
        curl_close($curl);
        //gsh_output(json_decode($result,true));
        echo $result;
    }




}
